<template>
  <div class="team-container">
    <h2>团队成员及分工</h2>
    <table class="team-table">
      <thead>
        <tr>
          <th>序号</th>
          <th>姓名</th>
          <th>角色</th>
          <th>分工任务</th>
        </tr>
      </thead>
      <tbody>
        <tr v-for="member in members" :key="member.id">
          <td>{{ member.id }}</td>
          <td>{{ member.name }}</td>
          <td>{{ member.role }}</td>
          <td>{{ member.task }}</td>
        </tr>
      </tbody>
    </table>
  </div>
</template>

<script setup>
defineProps({
  members: {
    type: Array,
    required: true
  }
});
</script>

<style scoped>
.team-container {
  background-color: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
h2 {
  color: #3498db;
  margin-bottom: 20px;
}
.team-table {
  width: 100%;
  border-collapse: collapse;
}
.team-table th, .team-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}
.team-table th {
  background-color: #3498db;
  color: white;
}
.team-table tr:hover {
  background-color: #f1f1f1;
}
</style>